package cn.tonyandmoney.voicenotes.alarm.entity;

import com.google.gson.Gson;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.OrderBy;

@Entity
public class TAlarm {
    @Id(autoincrement = true)
    private Long id;
    private String name = "闹钟";
    private String date;
    private int cycle = -1;  //默认只响一次，为-1
    private int ring = 0;
    private String voice;
    private String remark;

    @Generated(hash = 989427493)
    public TAlarm(Long id, String name, String date, int cycle, int ring,
                  String voice, String remark) {
        this.id = id;
        this.name = name;
        this.date = date;
        this.cycle = cycle;
        this.ring = ring;
        this.voice = voice;
        this.remark = remark;
    }

    @Generated(hash = 1413979346)
    public TAlarm() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDate() {
        return this.date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public int getCycle() {
        return this.cycle;
    }

    public void setCycle(int cycle) {
        this.cycle = cycle;
    }

    public int getRing() {
        return this.ring;
    }

    public void setRing(int ring) {
        this.ring = ring;
    }

    public String getVoice() {
        return this.voice;
    }

    public void setVoice(String voice) {
        this.voice = voice;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
